CREATE TABLE [dbo].[tb_relUsuarioRol]
(
[idUsuario] [int] NOT NULL,
[idRol] [int] NOT NULL
) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [key] ON [dbo].[tb_relUsuarioRol] ([idUsuario], [idRol]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_relUsuarioRol] WITH NOCHECK ADD CONSTRAINT [FK_tb_RelUsuarioRol_tb_Roles] FOREIGN KEY ([idRol]) REFERENCES [dbo].[tb_Roles] ([idRol]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[tb_relUsuarioRol] WITH NOCHECK ADD CONSTRAINT [FK_tb_RelUsuarioRol_tb_Usuarios] FOREIGN KEY ([idUsuario]) REFERENCES [dbo].[tb_Usuarios] ([idUsuario]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[tb_relUsuarioRol] NOCHECK CONSTRAINT [FK_tb_RelUsuarioRol_tb_Roles]
GO
ALTER TABLE [dbo].[tb_relUsuarioRol] NOCHECK CONSTRAINT [FK_tb_RelUsuarioRol_tb_Usuarios]
GO
GRANT SELECT ON  [dbo].[tb_relUsuarioRol] TO [GestionInstitucional]
GRANT SELECT ON  [dbo].[tb_relUsuarioRol] TO [Informatica]
GRANT SELECT ON  [dbo].[tb_relUsuarioRol] TO [PersonalDocente]
GRANT SELECT ON  [dbo].[tb_relUsuarioRol] TO [PersonalDocenteDireccion]
GRANT SELECT ON  [dbo].[tb_relUsuarioRol] TO [pregase]
GO
